<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>AI Bot 管理 - AI Bot Platform</title>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
    <link href="../styles.css" rel="stylesheet">
</head>
<body class="bg-gray-900 text-gray-100">
    <div id="app">
        <!-- 主要内容区域 -->
        <main class="max-w-7xl mx-auto py-6 sm:px-6 lg:px-8">
            <!-- 页面标题 -->
            <div class="px-4 sm:px-0 mb-8">
                <div class="flex justify-between items-center">
                    <h2 class="text-2xl font-bold">AI Bot 管理</h2>
                    <button onclick="showCreateBotModal()" class="bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-lg transition duration-300">
                        <i class="fas fa-plus mr-2"></i>创建新机器人
                    </button>
                </div>
            </div>

            <!-- Bot列表 -->
            <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 px-4">
                <!-- Bot卡片 -->
                <div class="card p-6 bg-gray-800 rounded-lg shadow-lg">
                    <div class="flex items-center justify-between mb-4">
                        <div class="flex items-center">
                            <div class="w-10 h-10 bg-blue-500 rounded-full flex items-center justify-center">
                                <i class="fas fa-robot text-white"></i>
                            </div>
                            <div class="ml-4">
                                <h3 class="text-lg font-semibold">客服助手</h3>
                                <p class="text-sm text-gray-400">在线 · 已连接知识库</p>
                            </div>
                        </div>
                        <div class="flex items-center">
                            <button class="text-gray-400 hover:text-white">
                                <i class="fas fa-ellipsis-v"></i>
                            </button>
                        </div>
                    </div>
                    <div class="mb-4">
                        <p class="text-gray-400">处理客户咨询，提供产品信息和技术支持。</p>
                    </div>
                    <div class="flex justify-between items-center">
                        <div class="flex space-x-2">
                            <span class="px-2 py-1 bg-blue-900 text-blue-300 text-xs rounded-full">客服</span>
                            <span class="px-2 py-1 bg-green-900 text-green-300 text-xs rounded-full">已部署</span>
                        </div>
                        <button class="text-blue-400 hover:text-blue-300">
                            <i class="fas fa-cog mr-1"></i>设置
                        </button>
                    </div>
                </div>
            </div>
        </main>

        <!-- 创建Bot模态框 -->
        <div id="createBotModal" class="hidden fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center">
            <div class="bg-gray-800 rounded-lg p-8 max-w-md w-full">
                <div class="flex justify-between items-center mb-6">
                    <h3 class="text-xl font-bold">创建新机器人</h3>
                    <button onclick="hideCreateBotModal()" class="text-gray-400 hover:text-white">
                        <i class="fas fa-times"></i>
                    </button>
                </div>
                <form>
                    <div class="mb-4">
                        <label class="block text-sm font-medium mb-2">机器人名称</label>
                        <input type="text" class="input w-full" placeholder="输入机器人名称">
                    </div>
                    <div class="mb-4">
                        <label class="block text-sm font-medium mb-2">描述</label>
                        <textarea class="input w-full h-24" placeholder="描述机器人的用途和功能"></textarea>
                    </div>
                    <div class="mb-4">
                        <label class="block text-sm font-medium mb-2">选择知识库</label>
                        <select class="input w-full">
                            <option value="">选择知识库</option>
                            <option value="1">产品手册</option>
                            <option value="2">技术文档</option>
                            <option value="3">常见问题</option>
                        </select>
                    </div>
                    <div class="flex justify-end space-x-4">
                        <button type="button" onclick="hideCreateBotModal()" class="px-4 py-2 text-gray-400 hover:text-white">取消</button>
                        <button type="submit" class="bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-lg transition duration-300">创建</button>
                    </div>
                </form>
            </div>
        </div>
    </div>

    <script>
        function showCreateBotModal() {
            document.getElementById('createBotModal').classList.remove('hidden');
        }

        function hideCreateBotModal() {
            document.getElementById('createBotModal').classList.add('hidden');
        }
    </script>
</body>
</html> 